<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="../tmp/importKodova.xml" -->
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template name="importKodova" match="/">
<xsl:choose>
<xsl:when test="$sys_action ='ucitaj'">
	<table>
		<caption>
			sažetak importa
			</caption>
		<tr>
			<th scope="row">id</th>
			<td><div align="right"><xsl:value-of select="form/rowData/import/id"/></div></td>
		</tr>
		<tr>
			<th scope="row">operater</th>
			<td><xsl:value-of select="/form/arrays/operater/value[@key=/form/variables/operater]"/></td>
		</tr>
		<tr>
			<th scope="row">broj kodova </th>
			<td><div align="right"><xsl:value-of select="format-number(form/variables/br_kodova, '#,###,##0')"/></div></td>
		</tr>
		<tr>
			<th scope="row">suma za nadoplatu </th>
			<td><div align="right"><xsl:value-of select="format-number(form/variables/suma_iznos, '#,###,###,##0.00')"/></div></td>
		</tr>
		<tr>
			<th scope="row">suma za prodaju </th>
			<td><div align="right"><xsl:value-of select="format-number(form/variables/suma_cijena, '#,###,###,##0.00')"/></div></td>
		</tr>
	</table>
	<p>&nbsp; </p>
	<table>
			<caption>
			slogovi importa
			</caption>
		<tr>
			<th scope="col">rbr</th>
			<th scope="col">kod</th>
			<th scope="col">serijski broj </th>
			<th scope="col">datum isteka </th>
			<th scope="col">iznos</th>
			<th scope="col">cijena</th>
		</tr>
		<xsl:for-each select="form/tables/import/row">
			<tr>
				<td><div align="right"><xsl:value-of select="rbr"/></div></td>
				<td><xsl:value-of select="kod"/></td>
				<td><xsl:value-of select="ser_br"/></td>
				<td><div align="right"><xsl:value-of select="concat(substring(datum_isteka, 9, 2), '.', substring(datum_isteka, 6, 2), '.', substring(datum_isteka, 1, 4))"/>
				  </div></td>
				<td><div align="right"><xsl:value-of select="format-number(iznos, '#,###,###,##0.00')"/></div></td>
				<td><div align="right"><xsl:value-of select="format-number(cijena, '#,###,###,##0.00')"/></div></td>
			</tr>
		</xsl:for-each>
	</table>
	</xsl:when>
	<xsl:otherwise>
		<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="index.php?__form=importKodova">
			<br />
			<table>
				<tr>
					<th scope="row">operater</th>
					<td><select name="operater" id="operater">
							<xsl:for-each select="form/arrays/operater/value">
								<option value="{@key}">
								<xsl:if test="@key=/form/variables/operater">
									<xsl:attribute name="selected">SELECTED</xsl:attribute>
								</xsl:if>
								<xsl:value-of select="." /> </option>
							</xsl:for-each>
						</select>					</td>
				</tr>
				<tr>
					<th scope="row">tip bona </th>
					<td><select name="tip_bona" id="tip_bona">
						<option value="">određen sadržajem datoteke</option>
				<xsl:for-each select="form/arrays/arr_tip/value">
					<option value="{@key}">
						<xsl:if test="@key=/form/variables/tip_bona">
							<xsl:attribute name="selected">SELECTED</xsl:attribute>
						</xsl:if>
						<xsl:value-of select="." />					</option>
				</xsl:for-each>
					</select>					</td>
				</tr>
				<caption>
				opcije importa 
				</caption>
				<tr>
					<th scope="row">datoteka</th>
					<td><input size="65" name="datoteka" type="file" />						</td>
				</tr>
				<tr>
                  <th scope="row">napomena</th>
				  <td><textarea name="napomena" cols="60" rows="4" id="naxpomena"></textarea></td>
			  </tr>
				<tr>
					<th scope="row">napravi samo pregled</th>
					<td><input name="samoPregled" type="checkbox" id="samoPregled" value="da" /></td>
			  </tr>
				<tr>
					<td colspan="2" scope="row">&nbsp;</td>
					</tr>
				<tr>
					<th colspan="2" scope="row"><div align="right">
						<input name="sys_action=ucitaj" type="submit" id="sys_action_ucitaj" value="Učitaj" />
					</div></th>
					</tr>
			</table>

		  <p>&nbsp;</p>
			<p>&nbsp;</p>
		</form>
	</xsl:otherwise>
</xsl:choose>
<p>&nbsp;</p>
<p>&nbsp;</p>
</xsl:template>
</xsl:stylesheet>